home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 2
/
Nebula Two.iso
/
SourceCode
/
GameKit
/
Apps
/
encryptHSpassword.c
next >
Wrap
Text File
|
1995-06-12
|
657b
|
22 lines
//
// encryptHSpassword.c -- use this to encrypt a password to put into a
// GameInfo object. Just replace the #define to the desired
// password, recompile, and run. Someday I'll put a real interface
// on this; at least it works.
#import <objc/Object.h>
#import <daymisckit/DAYString.h>
#define GK_HS_PASSWORD "NONE"
void main()
{
id aString = [[DAYString alloc] initString:GK_HS_PASSWORD];
id encr = [aString encrypt:[[DAYString alloc] initString:"GK"]]; // "GK" is the salt
printf("Encrypted string is: \"%s\"\n", [encr stringValue]);
exit(0);
}
// compile with:
// cc -ObjC encryptHSpassword.c -ldaymisckit -lNeXT_s -o encryptHSpassword